package com.mf.cloud.controller;

import com.mf.cloud.apis.PayGateWarFeignApi;
import com.mf.cloud.entites.PayDTO;
import com.mf.cloud.resp.ResultData;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: lmf
 * @Create: 2024/3/19 19:40
 * Description:  测试GetaWay订单控制层
 */
@RestController
@Tag(name = "测试网关接口")
@RequestMapping("/pay/gateWay")
public class OrderGateWayController {
    @Resource
    private PayGateWarFeignApi payGateWarFeignApi;

    @GetMapping("/get/{id}")
    @Operation(summary = "id查询测试")
    public ResultData<PayDTO> getPayGatewayById(@PathVariable("id") Integer id) {
        return payGateWarFeignApi.getPayGatewayById(id);
    }

    @Operation(summary = "字符串输出测试")
    @GetMapping("/info")
    public ResultData<String> getPayGatewayByInfo(){
        return payGateWarFeignApi.getPayGatewayInfo();
    }
}
